@charset "UTF-8";

input:-webkit-autofill {   /* 修复webkit下autocomplete黄色背景的问题 */
    box-shadow: 0 0 0 100px $white inset;
}

/* 文本框占位符颜色定义（不同浏览器必须分开设置，合并设置无效） */
::-webkit-input-placeholder    {color: $muted-gray;}
::-moz-placeholder             {color: $muted-gray;}

input::-moz-placeholder,
textarea::-moz-placeholder     {color: $muted-gray;}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {color: $muted-gray;}

[readonly] {
    cursor: default;
}

// input 基础样式
%input-base {
	display: inline-block;
	max-width: 100%;
    box-sizing: border-box;
    vertical-align: top;

    font-size: 14px;
    color: $black;
    background: $white;
    border: 1px solid $gray;
    border-radius: $input-radius;
    outline: none;

    transition: border-color .2s ease-in-out;

    &:hover {
        border-color: darken($dark-gray, 6%);
    }

    &:focus {
        outline: none;
        border-color: $blue;
    }

    &[disabled] {
        color: $gray;
        background-color: $dark-white;
        border-color: lighten($gray, 10%);
    }
}

.#{$ns-obj}input {
    @extend %input-base;
    height: $input-size-md;
    line-height: 1;
    padding: 3px $input-pd-lr;
}

.input-lg {
    height: $input-size-lg;
    font-size: 16px;
}

.input-sm {
    height: $input-size-sm;
    font-size: 13px;
}

.input-xs {
    height: $input-size-xs;
    font-size: 12px;
}

.#{$ns-obj}textarea {
    @extend %input-base;
    padding: 5px 8px;
    line-height: 1.5;
}
